<?php
class AppController extends Controller
{
    
    var $components = array('Session', 'Facebook.Connect',
        'Auth' => array(
      'authorize' => 'controller',
      'authorizedActions' => array('index','view')
    ), 'RequestHandler',
        );
    var $helpers = array('Session','Facebook.Facebook', 'Form', 'Javascript', 'Ajax');
    
    function beforeFilter(){
        $this->set('user', $this->Auth->user());
        $this->set('facebookUser', $this->Connect->user());
        
    }
    
    function isAuthorized(){
        return ($this->Auth->user('id'));
    }
}
?>
